import request from '@/utils/request'

// 查询分组管理信息列表
export function listGroup(data) {
  return request({
    url: '/console/securityGroup/list',
    method: 'post',
    data: data
  })
}

// 分组管理-添加
export function groupAdd(data) {
  return request({
    url: '/console/securityGroup/add',
    method: 'post',
    data: data
  })
}

// 分组管理-查询详情
export function getAllInfo(data) {
  return request({
    url: '/console/securityGroup/getAllInfo',
    method: 'post',
    data: data
  })
}

// 分组管理-修改
export function catalogueEdit(data) {
  return request({
    url: '/console/securityGroup/edit',
    method: 'post',
    data: data
  })
}
// 分组管理-修改
export function listGroupRemove(data) {
  return request({
    url: '/console/securityGroup/remove',
    method: 'post',
    data: data
  })
}

// 业务 保障组是否删除VIP、是否停止驱动、关闭B机自动切换
export function delAgentOtherInfo(data) {
  return request({
    url: '/console/securityGroup/delAgentOtherInfo',
    method: 'post',
    data: data
  })
}

// 节点管理-删除接口
export function groupRemove(data) {
  return request({
    url: '/console/hessNode/remove',
    method: 'post',
    data: data
  })
}

// 分组管理-查询切换历史
export function historyList(data) {
  return request({
    url: '/console/securitySysLog/groupSwitchList',
    method: 'post',
    data: data
  })
}

// 保障组-业务监控
export function configurationStatus(data) {
  return request({
    url: '/console/configuration/status',
    method: 'post',
    data: data
  })
}

// 保障组-业务监控
export function groupStatus(data) {
  return request({
    url: '/console/securityGroup/groupStatus',
    method: 'post',
    data: data
  })
}

// 保障组-文件监控-查询详情
export function fileOperateInfo(data) {
  return request({
    url: '/console/hessSysLog/fileOperateInfo',
    method: 'post',
    data: data
  })
}

// 保障组-系统参数-查询详情
export function getConfPropInfo(data) {
  return request({
    url: '/console/securityGroup/getConfPropInfo',
    method: 'post',
    data: data
  })
}

// 保障组-文件监控-添加/修改
export function editConfPropInfo(data) {
  return request({
    url: '/console/securityGroup/editConfPropInfo',
    method: 'post',
    data: data
  })
}

// 保障组-手动切换
export function manualSwitch(data) {
  return request({
    url: '/console/securityGroup/manualSwitch',
    method: 'post',
    data: data
  })
}

// 保障组-开始数据包同步
export function syncDataStart(data) {
  return request({
    url: '/console/securityGroup/syncDataStart',
    method: 'post',
    data: data
  })
}

// 保障组-开始数据包同步 日志
export function syncDataStatus(data) {
  return request({
    url: '/console/securityGroup/syncDataStatus',
    method: 'post',
    data: data
  })
}

// 保障组-退出自动保障
export function exitBz(data) {
  return request({
    url: '/console/securityGroup/exit',
    method: 'post',
    data: data
  })
}

// 保障组-手动切换监控 日志
export function groupSwitchNow(data) {
  return request({
    url: '/console/securitySysLog/groupSwitchNow',
    method: 'post',
    data: data
  })
}

// 保障组-手动切换节点状态
export function operatingService(data) {
  return request({
    url: '/console/configuration/operatingService',
    method: 'post',
    data: data
  })
}

// 保障组-获取自动切换状态
export function selectHessGroupAutoSwitch(data) {
  return request({
    url: '/console/securityGroup/selectSecurityGroupAutoSwitch',
    method: 'post',
    data: data
  })
}

// 保障组-获取网卡名称
export function nodeNetNameList(data) {
  return request({
    url: '/console/securityNode/nodeNetNameList',
    method: 'post',
    data: data
  })
}

// 保障组-获取保障组脑裂状态
export function fissureCheck(data) {
  return request({
    url: '/console/securityGroup/fissureCheck',
    method: 'post',
    data: data
  })
}

// 保障组-修复保障组脑裂状态
export function repairFissure(data) {
  return request({
    url: '/console/securityGroup/repairFissure',
    method: 'post',
    data: data
  })
}

// 保障组-修复保障状态
export function reGroupStatus(query) {
  return request({
    url: '/restful/groupStatus',
    method: 'get',
    params: query

  })
}

// 保障组-修复保障组
// 查询分组管理信息列表
export function relistGroup() {
  return request({
    url: '/restful/group/list',
    method: 'get'
  })
}

// 交换主从节点
export function exchangeNodeType(data) {
  return request({
    url: '/console/securityGroup/exchangeNodeType',
    method: 'post',
    data: data
  })
}

// 2. 监控页面添加: 系统监控
export function getSysMonitorInfo(data) {
  return request({
    url: '/console/securitySystem/getOne',
    method: 'post',
    data: data
  })
}

// 修复重置
export function securitySystemEdit(data) {
  return request({
    url: '/console/securitySystem/updateSecuritySystemStatus',
    method: 'post',
    data: data
  })
}

// 查询健康监测数据
export function queryKLine(data) {
  return request({
    url: '/console/hessNodeHealthy/queryKLine',
    method: 'post',
    data: data
  })
}

// 查询健康监测数据-预警
export function healthyEarlyInfo() {
  return request({
    url: '/restful/healthyEarlyInfo',
    method: 'get'
  })
}

// 修改数据保障初始化标记
export function editDataStatus(data) {
  return request({
    url: '/console/securityGroup/editDataStatus',
    method: 'post',
    data: data
  })
}

// 获取保障地址状态
export function getInfo(data) {
  return request({
    url: '/console/securityGroup/getInfo',
    method: 'post',
    data: data
  })
}

// 获取保障信息
export function findGroupConf(data) {
  return request({
    url: '/console/securityGroup/findGroupConf',
    method: 'post',
    data: data
  })
}

// 获取保障vip信息
export function groupSecurityServiceInfo(data) {
  return request({
    url: '/console/securityGroup/groupSecurityServiceInfo',
    method: 'post',
    data: data
  })
}

// 测试HTTP请求
export function httpCheck(data) {
  return request({
    url: '/console/securityGroup/httpCheck',
    method: 'post',
    data: data
  })
}

// 测试HTTP请求
export function checkVip(data) {
  return request({
    url: '/console/securityGroup/checkVip',
    method: 'post',
    data: data
  })
}

// 获取服务启停等待时长总和 CDP恢复界面调用
export function getCheckDelay(data) {
  return request({
    url: '/console/securityGroup/getCheckDelay',
    method: 'post',
    data: data
  })
}

